package com.torlesse.feign;

import com.torlesse.config.FeignConfig;
import com.torlesse.feign.impl.UserClientImpl;
import com.torlesse.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author ：torlesse
 * @date ：Created in 16:32 2021/8/8 0008
 * @description ：
 * @version: 1.0
 */
//user-provider 服务提供者微服务的名称
@FeignClient(value = "user-provider",path = "/user",fallback = UserClientImpl.class,configuration = FeignConfig.class)
public interface UserClient {

    @GetMapping(value = "/{id}")
    User findByUid(@PathVariable("id")Integer id);
}
